package com.lyncs.ods.resp;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author alex
 * @date 2022/4/03 23:41
 * @description
 */
@Data
@Accessors(chain = true)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class UnsettledDeliveryBillResp {

    @ApiModelProperty("账款名称")
    private String name;

    @ApiModelProperty(value = "deliver ID")
    private Long deliverId;

    @ApiModelProperty(value = "交付单名称")
    private String deliverName;

    @ApiModelProperty(value = "是否为跳转的交付单")
    private Boolean selected;

    @ApiModelProperty(value = "状态")
    private Integer status;

    @ApiModelProperty(value = "账款ID")
    private Long billId;

    @ApiModelProperty("账款总金额")
    private BigDecimal totalAmount;

    @ApiModelProperty("已结算金额")
    private BigDecimal settledAmount;

    @ApiModelProperty("未结算金额")
    private BigDecimal unsettledAmount;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("货币")
    @TableField("currency")
    private String currency;

    @ApiModelProperty(value = "账款详情信息")
    private List<BillFeeInfo> feeInfos;

    @Data
    @Accessors(chain = true)
    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    public static class BillFeeInfo {

        @ApiModelProperty("款项名称")
        private String feeName;

        @ApiModelProperty("款项金额")
        private BigDecimal feeAmount;

        @ApiModelProperty("备注")
        private String remark;


    }
}
